env = Environment()

src_files = '@class_name.cpp' 

lib_@class_name = env.SharedLibrary(target = '@class_name', source = src_files)
Default(lib_@class_name)

install_dir_lib = '/usr/lib/@class_name'
install_dir_include = '/usr/include/@class_name'

env.Alias('install', env.Install(install_dir_lib, lib_@class_name))
env.Alias('install', env.Install(install_dir_include, '@class_name.h'))

env.Command("uninstall", None, Delete(FindInstalledFiles()))

if 'package' in COMMAND_LINE_TARGETS:
  package_name = '@class_name'
  package = env.Command('package', None, 'tar -czvf ../%s.tar.gz .' % package_name)
elif 'clean' in COMMAND_LINE_TARGETS:
  clean = env.Command('clean', None, 'scons -c')
else:
  pass
